//index.js
//获取应用实例
const app = getApp()

Page({
  data:{
    city:''
  },
  onLoad:function(e){
    console.log(e);
    if ('city' in e){
      this.setData({
        city: e.city
      });
    }
    
  },
  /**
   * 生命周期函数 - 监听页面初次渲染完成
   */
  onReady: function () {
   //获得dialog组件
   this.dialog = this.selectComponent('#dialog');
  },
  showDialog(){
    this.dialog.showDialog();
  },
  //取消事件
  _cancelEvent(){
    console.log('你点击了取消');
    this.dialog.hideDialog();
  },
  //确认事件
  _confirmEvent(){
    console.log('你点击了确定');
    this.dialog.hideDialog();
  },
  toSelectCity:function(e){
    wx.navigateTo({
      url: '../selectCity/selectCity',
      success: function(res) {},
      fail: function(res) {},
      complete: function(res) {},
    })
  }
})
